Skip to content

feat(web-api): add agents.sessions.setStatus and agents.sessions.rename - #1942

Merged
zimeg merged 2 commits into
mainfrom
clack/agents-sessions-methods
Aug 21, 2026
Merged

feat(web-api): add agents.sessions.setStatus and agents.sessions.rename#1942
zimeg merged 2 commits into
mainfrom
clack/agents-sessions-methods

Conversation

@zimeg

@zimeg zimeg commented Aug 18, 2026

Copy link
Copy Markdown
Member

Adds the agents.sessions.* Web API methods (setStatus, rename) to the sync, async, and legacy web clients — the successors to assistant.threads.setStatus/setTitle for the agent sessions model. Async + legacy generated via scripts/codegen.py.

Documentation

@zimeg zimeg self-assigned this Aug 18, 2026
@zimeg zimeg added enhancement M-T: A feature request for new functionality web-client semver:minor labels Aug 18, 2026
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.17%. Comparing base (bfb098a) to head (6d89d0c).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1942      +/-   ##
==========================================
+ Coverage   84.15%   84.17%   +0.02%     
==========================================
  Files         118      118              
  Lines       13446    13470      +24     
==========================================
+ Hits        11315    11339      +24     
  Misses       2131     2131              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@zimeg
zimeg force-pushed the clack/agents-sessions-methods branch from 5bb5f7a to b6d4508 Compare August 18, 2026 06:05
@zimeg
zimeg force-pushed the clack/agents-sessions-methods branch 5 times, most recently from 8f67af3 to 1c5afec Compare August 19, 2026 22:16
zimeg added a commit to slackapi/node-slack-sdk that referenced this pull request Aug 20, 2026
Mirror the Python SDK (slackapi/python-slack-sdk#1942) for the two
agents.sessions methods:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the client.agents.sessions.{rename,setStatus} bindings, the request
argument types, and the response types.

The response types are generated from the java-slack-sdk API sample logs
via scripts/generate-web-api-types.sh; the samples land in
slackapi/java-slack-sdk#1633, so the generator must be re-run against
java-slack-sdk main once that ships to pick up the final response shape.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg force-pushed the clack/agents-sessions-methods branch from 1c5afec to ecf3482 Compare August 20, 2026 17:19
@zimeg
zimeg marked this pull request as ready for review August 21, 2026 21:23
@zimeg
zimeg requested a review from a team as a code owner August 21, 2026 21:23
@zimeg zimeg added this to the 3.44.0 milestone Aug 21, 2026
@zimeg
zimeg force-pushed the clack/agents-sessions-methods branch from ecf3482 to ea7f8e0 Compare August 21, 2026 21:27
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg force-pushed the clack/agents-sessions-methods branch from ea7f8e0 to 1e8707b Compare August 21, 2026 21:48
The all_api_methods list is ordered by family; agents.sessions.rename /
setStatus were placed before assistant.* but belong before api.test
(agents < api). Move them to the correct alphabetical position.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg

zimeg commented Aug 21, 2026

Copy link
Copy Markdown
Member Author

Self-review notes (author) — for a reviewer's context

Sharing what I checked so a reviewer has the full picture. This is a self-review, not an approval.

Correctness

  • Method impls (sync / async / legacy) follow the established per-method pattern exactly: **kwargs merge → _remove_none_valuesapi_call(..., json=kwargs). json= (POST body) is correct for these, matching assistant.threads.*.
  • Return types are correct per client (SlackResponse / AsyncSlackResponse / Union[Future, SlackResponse]).
  • Arguments match the reference docs: agents.sessions.rename = channel_id + title (required), thread_ts (optional); agents.sessions.setStatus = channel_id + status (required), plus thread_ts / title / initiator_user_id / icon_emoji / icon_url / username.
  • Ordering is alphabetical by family in both the client method defs and the coverage all_api_methods list (admin.workflowsagents.sessionsapi).

Testing

  • test_web_client_coverage exercises both methods (endpoint count 306 → 308); green across all Python versions in CI.
  • The underlying endpoints were separately live-verified against real Slack via the Java SDK remote test (agents.sessions.setStatus + rename, ok: true, response shape confirmed). The three SDKs share identical argument sets, so these bindings call endpoints that are proven to work.

Note

  • No per-method request-assertion unit test beyond the coverage test — consistent with this repo's convention (the coverage test is the standard bar here).

Docstrings link only to public docs.slack.dev. Companion PRs: Java slackapi/java-slack-sdk#1633, Node slackapi/node-slack-sdk#2703.

@zimeg
zimeg merged commit ac312d4 into main Aug 21, 2026
18 checks passed
@zimeg
zimeg deleted the clack/agents-sessions-methods branch August 21, 2026 23:10
zimeg added a commit to slackapi/node-slack-sdk that referenced this pull request Aug 22, 2026
Mirror the Python SDK (slackapi/python-slack-sdk#1942) for the two
agents.sessions methods:

- agents.sessions.rename    Rename an agent session.
- agents.sessions.setStatus Set an agent session's lifecycle status,
                            creating the session if needed.

Adds the client.agents.sessions.{rename,setStatus} bindings, the request
argument types, and the response types.

The response types are generated from the java-slack-sdk API sample logs
via scripts/generate-web-api-types.sh; the samples land in
slackapi/java-slack-sdk#1633, so the generator must be re-run against
java-slack-sdk main once that ships to pick up the final response shape.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor Version: 3x web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant